﻿#include "NodeMatrix.h"

int main() 
{
	osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
	osg::ref_ptr<NodeMatrix> nm = new NodeMatrix;
	osg::ref_ptr<osg::Group> group = new osg::Group;
	osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("glider.osg");

	nm->addsChild(osgDB::readNodeFile("TrCow.osg"));
	//nm->rotating(osg::Vec3d(10.0f, 0.0f, 0.0f), osg::Z_AXIS, 1.0f);
	//nm->toRotate(1, osg::Y_AXIS);
	//nm->toPosition(osg::Vec3d(5.0f, 0.0f, 0.0f));
	nm->adapt(node.get());

	group->addChild(node.get());
	group->addChild(nm.get());

	viewer->setUpViewInWindow(100, 100, 1024, 768);

	viewer->setSceneData(group.get());
	return viewer->run();
}